$(document).ready(initWeb);
function initWeb() {
	$("#captchaflag").val("false");
	$("#accountflag").val("false");
	setup();
	setupSelect();
	$("#account").focus(iof1).blur(checkaccount);
	$("#email").focus(iof2).blur(checkemail);
	$("#password").focus(iof3).blur(checkpwd);
	$("#repwd").focus(iof4).blur(checkrepwd);
	$("#nickname").focus(iof5).blur(checknickname);
	$("#sex").focus(iof6).blur(checksex);
	$("#age").focus(iof7).blur(checkage);
	$("#s1").focus(iof8).blur(checkprovince);
	$("#s2").focus(iof9).blur(checkcity);
	$("#captcha").focus(iof0).blur(checkcaptcha);
	$("#checkbox").change(checkaccept);
	$("#capcode").click(changecaptcha);
	$("#cgc").click(changecaptcha);
	var sex1 = $("#ss0").val();
	$("#sex").val(sex1);
	var pro1 = $("#ss1").val();
	$("#s1").val(pro1);
	change(1);

	var city1 = $("#ss2").val();
	$("#s2").val(city1);
}
//提交
function doCheck() {
	var b1 = checkaccount1();
	var b2 = checknickname();
	var b3 = checkpwd();
	var b4 = checkrepwd();
	var b5 = checksex();
	var b50 = checkage();
	var b51 = checkprovince();
	var b52 = checkcity();
	var b6 = checkemail();
	var b7 = checkcaptcha1();
	var b8 = checkaccept();
	//return true;
	return (b1&&b2&&b3&&b4&&b5&&b50&&b51&&b52&&b6&&b7&&b8);
}
function iof1(){
	showMsg(this.id, "4~20个字符，包括字母、数字，以字母开头");
}
function iof2(){
	showMsg(this.id, "邮箱账号，是找回密码的重要依据");
}
function iof3(){
	showMsg(this.id, "6个以上字符，必须是英文字母、数字");
}
function iof4(){
	showMsg(this.id, "请再次输入密码");
}
function iof5(){
	showMsg(this.id, "1~10个字符，包括汉字、字母和数字等");
}
function iof6(){
	showMsg(this.id, "选择您的性别，注册后不可修改");
}
function iof7(){
	showMsg(this.id, "选择您的真实年龄");
}
function iof8(){
	showMsg(this.id, "选择你所在的省");
}
function iof9(){
	showMsg(this.id, "选择你所在的市");
}
function iof0(){
	showMsg(this.id, "输入图片上的字母，不区分大小写");
}